package com.common.utilities;

import java.util.ArrayList;
import java.util.List;

import org.apache.log4j.Logger;

/**
 * User: wattsc5
 * <p/>
 * Date: 2/27/12
 */
public class SendData
{
	private static final Logger logger = Logger.getLogger(SendData.class);

	private List<String> arguments;

	/**
	 * Initializes a new instance of a SendData.
	 */
	public SendData()
	{
		this.arguments = new ArrayList<String>();
	}

	public String getDataAsString()
	{
		String data = "[";

		for (int i = 0; i < this.arguments.size(); i++)
		{
			data += this.arguments.get(i);
			if (i + 1 != this.arguments.size())
			{
				data += ",";
			}
		}

		data += "]";

		return data;
	}

	public void addArgument(String argument)
	{
		this.arguments.add(argument);
	}

	public void addArgument(int argument)
	{
		this.arguments.add(Integer.toString(argument));
	}

	public String toString()
	{
		return this.getDataAsString();
	}
}
